#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<windows.h>
#include<stdlib.h>
void* my_memove(void* str1, void* str2, size_t n) {
    void* ret = str1;
    if (str1 < str2) {
        while (n--) {
            *(char*)str1 = *(char*)str2;
            ++(char*)str1;
            ++(char*)str2;
        }
    }
    else {
        while (n--) {
            *((char*)str1 + n) = *((char*)str2 + n);
        }
    }

    return ret;
}
int main() {
    char arr[10] = "abcdefg";
    my_memove(arr+2, arr , 3);
    printf("%s\n", arr);
    return 0;
}


/* char arr[10] = "hello";
    memset(arr, 120, 3);
    printf("%s\n", arr);*/